﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _7_3_Class
{
    //部分类
    public partial class PartialClass 
    {
        #region 属性
        private int hp;
        private int mp;
        private int maxHp;
        private int maxMp;
        #endregion


        partial void DoSomething();
    }

    public partial class PartialClass
    {
        public int Hp
        {
            set
            {
                if (value < 0)
                    hp = 0;
                else if (value > MaxHp)
                    hp = MaxHp;
                else
                    hp = value;

             }
            get { return hp; }
        }

        public int MaxHp
        {
            get { return (int)(maxHp * 1.1); }
        }

        partial void DoSomething()
        {

        }
    }

    public partial class PartialClass 
    {
        public void MoveTo(float x, float y, float z)
        {
             
        }

        public void Attack()
        {

        }

        public void Dump()
        {

        }

    }
}
